<?php

//UMA new
namespace App\Http\Controllers\Api;


use Illuminate\Http\Request;
use App\Models\ContactInfo;
use App\Services\MailService;
use App\Http\Resources\CustomerHistory;

class MailController extends BaseController
{
    /**
     * 获取邮件所需相关信息
     * メールに必要な関連情報を入手する
     * @param MailPostRequest $request
     * @return \Illuminate\Http\JsonResponse
     */
    public function index(Request $request)
    {
        $contactInfoId = $request->input('contact_info_id');
        $info = ContactInfo::findOrFail($contactInfoId);
        return new CustomerHistory($info->customer_history);
    }
}
